local key = KEYS[1]
local v_token = ARGV[1]
local v_px = ARGV[2]
local r_set = redis.call('set', key, v_token, "px", v_px, "nx")
if r_set then
    return 1
end
local r_get = redis.call('get', key)
return r_get == v_token or 0
